#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include "System.h"
#include <QDialog>
#include <QtSql>
#include <QPainter>

namespace Ui {
class LoginDialog;
}

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    System* sys;

    explicit LoginDialog(System* sys, QWidget *parent = nullptr);
    ~LoginDialog();

signals:
    void loginSuccessful();

private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

private:
    Ui::LoginDialog *ui;

    void initUi();

protected:
    void paintEvent(QPaintEvent *event) override
    {
        QPainter painter(this);
        painter.drawPixmap(rect(),QPixmap(":/4.png"),QRect());

        //painter.drawPixmap(ui->tabWidget->rect(), QPixmap(":/1.png"), QRect());
    }

};

#endif // LOGINDIALOG_H
